home *** CD-ROM | disk | FTP | other *** search
- /*
- ** patch.library
- **
- ** Copyright © 1993-1997 by Stefan Fuchs
- ** Freely distributable.
- */
-
- #ifndef _PATCH_INCLUDES_H
- #include "patch_includes.h"
- #endif
-
-
- /****** patch.library/FindPatch ***************************************
- *
- * NAME
- * FindPatch -- find a patch structure with a given name.
- *
- * SYNOPSIS
- * patch = FindPatch( name )
- * D0 A0
- *
- * struct Patch *FindPatch( STRPTR );
- *
- * FUNCTION
- * This function will search the patch.library lists for a
- * patch structure with the given name. The first patch matching
- * this name will be returned.
- *
- * This function exists only for historic reasons.
- * It will internally be routed to FindPatchTags().
- *
- * INPUTS
- * name = Name of the patch structure to find
- *
- * RESULT
- * patch = a pointer to the patch structure with the same name else
- * NULL to indicate that the string was not found.
- *
- * NOTES
- * If your task is not the owner of the patch, the
- * pointer is only valid as long as the system is in forbid().
- * From V2 on you may also lock the patch.library semaphore
- * before calling this function. In this case a pointer to
- * a patch structure is guaranteed to be valid, until you
- * release the semaphore. The semaphore, however, should be kept
- * locked only for short periods of time in order not to block
- * other tasks.
- *
- * BUGS
- *
- * SEE ALSO
- * InstallPatch(), RemovePatch(), patch.h
- *
- ******************************************************************************
- *
- */
-
- struct Patch * LIBFUNC FindPatch( REGA0 STRPTR name GNUC_REGA0)
- {
- struct TagItem taglist[2];
- taglist[0].ti_Tag = PATT_PatchName;
- taglist[0].ti_Data = (ULONG) name;
-
- taglist[1].ti_Tag = TAG_DONE;
-
- return (FindPatchTagsA(taglist));
- }
-